import java.util.Scanner;

public class Solution {
    //超时
    public static int m(int a, int b){
        if(a>=1 && a<=1024 && b>=1 && b<=1024){
            if(a==b){
                return 1;
            }else{
                return 0;
            }
        }else{
            return -1;
        }
    }

    public static void main(String args[]){
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        System.out.println(m(a,b));
    }

}

